<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'cat-product-form',
	'enableAjaxValidation'=>false,
	'htmlOptions'=>array(
        'enctype'=>'multipart/form-data'
    )
)); ?>


	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'name_en',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'uk',array('class'=>'span5','maxlength'=>255)); ?>

	<?php #echo $form->textFieldRow($model,'created_time',array('class'=>'span5')); ?>

	<?php #echo $form->textFieldRow($model,'enable',array('class'=>'span5')); ?>

	<label>Enable</label>
	<?php echo CHtml::dropDownList('enable',(empty($model->enable))? $model->enable : 1 ,array(
    		'0'=>'No',
    		'1'=>'Yes',
		),
        array(
        	'name'=>'CatProduct[enable]',
        )
	); ?>

	<?php #echo $form->textFieldRow($model,'parent_id',array('class'=>'span5','maxlength'=>11)); ?>

	<label>Thư mục cha</label>
	<?php echo CHtml::dropDownList('parent_id','',$listCat,array(
        	'name'=>'CatProduct[parent_id]',
        )); ?>
        
    <div class="row">
		<label>Images</label>
		<input type="file" name="image" id="input_image">
	</div>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
